home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume12 / cake / part07 < prev    next >
Encoding:
Internet Message Format  |  1987-10-15  |  45.3 KB

  1. Subject:  v12i013:  Cake, a make replacement, Part07/09
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rs@uunet.UU.NET
  5.  
  6. Submitted-by: Zoltan Somogyi <zs@munnari.oz>
  7. Posting-number: Volume 12, Issue 13
  8. Archive-name: cake/part07
  9.  
  10. #! /bin/sh
  11. # This is a shell archive, meaning:
  12. # 1. Remove everything above the #! /bin/sh line.
  13. # 2. Save the resulting text in a file.
  14. # 3. Execute the file with /bin/sh (not csh) to create:
  15. #    README
  16. #    cake.1l
  17. #    ccincl.1l
  18. #    ccs.1l
  19. #    cs.1l
  20. #    gred.1l
  21. #    gres.1l
  22. #    gsrc.1l
  23. #    irrel.1l
  24. #    later.1l
  25. #    need.1l
  26. #    needed.1l
  27. #    ol.1l
  28. #    soincl.1l
  29. #    ssize.1l
  30. #    sub.1l
  31. #    subcmd.1l
  32. #    usrc.1l
  33. #    yyrepl.1l
  34. # This archive created: Wed Oct 14 20:26:03 1987
  35. export PATH; PATH=/bin:/usr/bin:$PATH
  36. echo mkdir Man
  37. mkdir Man
  38. echo cd Man
  39. cd Man
  40. echo shar: "extracting 'README'" '(684 characters)'
  41. if test -f 'README'
  42. then
  43.     echo shar: "will not over-write existing file 'README'"
  44. else
  45. sed 's/^X//' << \SHAR_EOF > 'README'
  46. XThis directory contains manuals for cake and its associated commands.
  47. X
  48. XThe manuals are named *.1l. They are written for the -man macros
  49. X(of course), and are patterned after Pyramid manual pages - I started
  50. Xwriting them while using a Pyramid 90x. You may want to change the
  51. Xpathnames in cake.1l to match the ones you put in ../conf.h.
  52. X
  53. XThe file paper.bib contains a partially preprocessed version of a paper
  54. XI wrote on cake; the citation is
  55. X
  56. X%A Zoltan Somogyi
  57. X%T Cake: a fifth generation version of make
  58. X%J Australian Unix system User Group Newsletter
  59. X%K auugn
  60. X%V 7
  61. X%N 6
  62. X%D April 1987
  63. X%P 22-31
  64. X
  65. XThe file has been put through bib; you should put it through eqn, tbl
  66. Xand the -me macros.
  67. SHAR_EOF
  68. if test 684 -ne "`wc -c < 'README'`"
  69. then
  70.     echo shar: "error transmitting 'README'" '(should have been 684 characters)'
  71. fi
  72. fi
  73. echo shar: "extracting 'cake.1l'" '(24383 characters)'
  74. if test -f 'cake.1l'
  75. then
  76.     echo shar: "will not over-write existing file 'cake.1l'"
  77. else
  78. sed 's/^X//' << \SHAR_EOF > 'cake.1l'
  79. X.ds c \fIcake\fP
  80. X.ds C \fICake\fP
  81. X.ds cf \fIcakefile\fP
  82. X.ds Cf \fICakefile\fP
  83. X.if n .ds lq \&"\"
  84. X.if n .ds rq \&"\"
  85. X.if t .ds lq ``
  86. X.if t .ds rq ''
  87. X.TH CAKE 1-ucb
  88. X.SH NAME
  89. Xcake \- maintain groups of related files
  90. X.SH ORIGIN
  91. XUniversity of Melbourne
  92. X.SH SYNOPSIS
  93. X.B cake
  94. X[ options ] ...  file ...
  95. X.SH DESCRIPTION
  96. X.PP
  97. X\*C is a program to maintain groups of related files.
  98. XA \*(cf needs to describe for each file
  99. Xthe set of other files it can be made from,
  100. Xand the action which will update it from those files.
  101. XThen, given this \*(cf and the names of some files,
  102. X\*c traces through the network of dependencies
  103. Xand executes just those actions necessary to update the files.
  104. XThis is much faster than issuing the same commands manually
  105. Xand it virtually eliminates the risks
  106. Xof working with out-of-date files.
  107. X.PP
  108. X\*C's province overlaps that of make(1).
  109. XHowever, \*c's design philosophy emphasizes simplicity and generality
  110. Xto a much greater extent than make's.
  111. XThe principal differences are:
  112. X.IP (a)
  113. X\*C dependencies may be dynamic,
  114. Xand their applicability may be conditional upon a test.
  115. X.IP (b)
  116. X\*C rules have the same syntax and semantics as ordinary dependencies,
  117. Xand may have any number of targets.
  118. X.IP (c)
  119. XThere are no restrictions on the forms of
  120. Xeither the targets or the sources.
  121. XThis enables \*c to handle files in more than one directory
  122. Xand to interface with SCCS, RCS and archivers,
  123. Xamong others, without any special arrangements.
  124. X.IP (d)
  125. X\*C has a more general search algorithm than make.
  126. XWhen seeking a target it considers all rules which could update it
  127. Xeven if the corresponding intermediate files do not exist;
  128. Xit recreates them if (and only if) it is necessary to do so.
  129. X.IP (e)
  130. X\*(Cfs are passed through the C preprocessor.
  131. XThey may therefore #include other \*(cfs (including standard ones)
  132. Xand use #if and #ifdef to customize themselves.
  133. X.IP (f)
  134. X\*C allows the user to choose his own shell,
  135. Xand to include shell scripts in actions.
  136. X.IP (g)
  137. X\*C can check to see if a newly 'updated' file
  138. Xhas actually been changed via a bit-by-bit comparison,
  139. Xwhich works even if the modify date has been touched.
  140. XIf there is no change, \*c avoids recomputing the file's dependents.
  141. X.IP (i)
  142. X\*C has a lot more options
  143. X(whether one considers these an improvement
  144. Xof course depends on whether one needs them).
  145. X.PP
  146. X\*C is not oriented toward any particular type of files,
  147. Xas make is towards program files (source and object).
  148. XFor example, standard \*(cfs exist to handle
  149. Xdocuments and VLSI designs, as well as programs.
  150. X.SH SYNTAX
  151. X.sp
  152. XBefore being seen by \*c,
  153. X\*(cfs are piped through the C preprocessor.
  154. XThe standard arguments to the preprocessor set up the search path
  155. Xto visit the user's library directory (~/lib/cake)
  156. Xand the directory /usr/lib/cake, which contains
  157. Xstandard sets of entries for program development, text processing, etc.
  158. XIn addition, \*c gives its command line arguments to the preprocessor
  159. Xas the value of the macro CAKEFLAGS.
  160. X.PP
  161. X\*C accepts standard C comments as well as
  162. Xcomments starting with a '$' and extending to the end of the line
  163. X(the first are stripped by the preprocessor, the second by \*c itself).
  164. XThe single-line comments are particularly useful for commenting out
  165. Xpreprocessor directives by changing '#' into '$' or '$#'.
  166. X.PP
  167. XA fair number of characters have special meaning for \*c.
  168. XAny character can be prevented from being recognised as special
  169. Xby preceding it with a backslash.
  170. XThis can also be used to put arbitrary characters (including backslashes
  171. Xbut excluding newline and formfeed) into patterns (see below).
  172. X.PP
  173. XA \*(cf after preprocessing should be
  174. Xa sequence of entries separated by blank lines,
  175. Xwith possibly one or more lines indicating options.
  176. XOption lines must be aligned on the margin
  177. Xand begin with the word \*(lqset\*(rq;
  178. Xthe rest of the line is processed as a set of \*c options.
  179. XAn entry consists of dependency rules aligned on the left margin
  180. X(with targets to the left and sources to the right of the colon)
  181. Xand a possibly empty list of indented action lines (as in make).
  182. XIf more than one dependency is given
  183. Xthe actions apply to all of them.
  184. X.PP
  185. X\*C treats unescaped percent signs and a possible following digit
  186. X(% and %0 to %9) as 11 \*(lqvariables\*(rq
  187. Xfor which any string may be consistently substituted
  188. Xthroughout an entry.
  189. XSo an entry which contains variables
  190. Xis a template for an infinite number of entries without variables.
  191. XThis is the mechanism \*c uses
  192. Xinstead of make's entries with .x.y targets.
  193. X.PP
  194. XThe following yacc grammar describes the syntax of
  195. Xdependency rules (rule) and of actions (act).
  196. XThe suffixes _l and _el denote
  197. Xnonempty and possibly empty lists respectively.
  198. XKeywords are quoted;
  199. Xother terminal symbols are in uppercase.
  200. X.sp
  201. X.nf
  202. Xrule    :    pat_l \*(lq:\*(rq pat_el cond
  203. X    |    pat_l \*(lq::\*(rq pat_el cond
  204. Xcond    :    \*(lqif\*(rq test
  205. X    |    /* empty */
  206. Xtest    :    basepat \*(lqin\*(rq pat_l
  207. X    |    basepat \*(lqmatch\*(rq basepat
  208. X    |    basepat \*(lqmatch\*(rq basepat basepat
  209. X    |    \*(lqexist\*(rq basepat
  210. X    |    \*(lqcando\*(rq basepat
  211. X    |    \*(lqok\*(rq basepat
  212. X    |    TESTCMD
  213. X    |    test \*(lqand\*(rq test
  214. X    |    test \*(lqor\*(rq test
  215. X    |    \*(lqnot\*(rq test
  216. X    |    \*(lq(\*(rq test \*(lq)\*(rq
  217. Xact    :    aflag_el ACT
  218. X    |    aflag_el BEGIN_ACT ACT_el END_ACT
  219. Xbasepat    :    PAT
  220. X    |    PATCMD
  221. Xpat    :    basepat pflag_el
  222. X    |    \*(lq(\*(rq pat_l \*(lq)\*(rq flag_el
  223. Xaflag    :    \*(lq@\*(rq
  224. X    |    \*(lq-\*(rq
  225. X    |    \*(lq+\*(rq
  226. X    |    \*(lq!\*(rq
  227. Xpflag    :    \*(lq@\*(rq
  228. X    |    \*(lq&\*(rq
  229. X    |    \*(lq!\*(rq
  230. X    |    \*(lq^\*(rq
  231. X    |    \*(lq*\*(rq
  232. X.fi
  233. X.PP
  234. XA dependency rule consists of a list of \fItarget\fP patterns 
  235. Xfollowed (after a colon) by a list of \fIsource\fP patterns.
  236. XIt states that the files corresponding to the target patterns
  237. Xdepend on the files of the source patterns.
  238. XIf any are out-of-date, \*c will try to update them;
  239. Xsee the section on semantics.
  240. XThe difference between single and double colons
  241. Xis explained there also (it is \fInot\fP the same as in make)).
  242. X.PP
  243. XThere are two kinds of patterns.
  244. XA name pattern (PAT) is a sequence of letters,
  245. Xdigits and special symbols from the set _/%,.+-
  246. Xalthough other characters can also be included
  247. Xif escaped with a backslash.
  248. XAn alternate form, which obviates the need for backslashes
  249. Xis a sequence of characters between double quotes,
  250. Xwhich themselves can be included if escaped with a backslash.
  251. X.PP
  252. XThe other kind of pattern (a pattern given by command: PATCMD)
  253. Xis a string enclosed in matching double square brackets,
  254. Xe.g. [[echo *.c]].
  255. XThe string may contain non-matching double square brackets
  256. Xif at least one is escaped with a backslash.
  257. XStrings between matching brackets are executed as commands
  258. Xand replaced by the output of the command, innermost-first.
  259. XThe expansion in this fashion of a PATCMD is then
  260. Xinterpreted as a pattern, or as a possibly empty list of patterns
  261. Xif that is more appropriate.
  262. XE.g. the PATCMD [[sub X.c X.o [[echo *.c]]]] when executed
  263. Xin a directory which contains a.c b.c and c.c will expand to
  264. Xthe list a.o, b.o and c.o.
  265. XNote that the generated patterns must be name patterns,
  266. Xnot command patterns, i.e. if a command's output contains
  267. Xdouble brackets they will not be ignored.
  268. X.PP
  269. XOf the five flags that can appear after patterns and pattern lists,
  270. Xfour apply to target patterns,
  271. Xand one ('*') applies to source patterns.
  272. X.IP '@'
  273. XA '@' character tells \*c that the target is not volatile;
  274. Xwhenever \*c executes the associated command
  275. Xit checks if it changes the nonvolatile file.
  276. XIf not, its dependents are not considered out-of-date wrt this file.
  277. X.IP '&'
  278. XA '&' postfix means that the pattern is not really a file;
  279. Xthis prevents \*c from worrying
  280. Xif there are no actions to generate the pseudofile
  281. Xor if the actions do not create a file
  282. Xwith the pattern's name.
  283. X.IP '!'
  284. XA '!' tells \*c to consider the target precious in the sense of make.
  285. XDirectories are automatically precious.
  286. X.IP '^'
  287. XA file marked with '^' is deleted before \*c exits
  288. Xunless it is one of the main targets or if it cannot be regenerated.
  289. X.IP '*'
  290. XA star after a source name pattern
  291. Xtells \*c to update the flagged file
  292. Xbefore expanding source command patterns and before executing the test.
  293. XStars cannot appear after target patterns
  294. Xor after source command patterns.
  295. X.PP
  296. XThe definitions of the five primitive tests:
  297. X.br
  298. X.TP 14
  299. X{{cmd}}
  300. XExecute cmd and interpret its exit status:
  301. Xzero is true, everything else is false.
  302. XThe cmd may contain matched sets of double square brackets,
  303. Xjust as in PATCMD.
  304. X.TP 14
  305. X\*(lqexist\*(rq file
  306. XTrue if file exists.
  307. X.TP 14
  308. X\*(lqcando\*(rq file
  309. XTrue if file can be made according to this \*(cf.
  310. X.TP 14
  311. X\*(lqok\*(rq file
  312. XTrue if file is up-to-date according to this \*(cf.
  313. X.TP 14
  314. Xfile \*(lqmatch\*(rq pattern
  315. XTrue if file is matches pattern,
  316. Xwith X as the variable character.
  317. X.TP 14
  318. Xfile \*(lqmatch\*(rq argument pattern
  319. XTrue if file is matches pattern,
  320. Xwith argument specifying the variable character
  321. Xas if it were an option to sub(1).
  322. XE.g. an omitted argument is equivalent to \-vX as the argument.
  323. X.TP 14
  324. Xpat \*(lqin\*(rq pat1 .. patn
  325. XTrue if pat occurs among the list pat1 .. patn.
  326. X.PP
  327. XThe precedence of \*(lqand\*(rq, \*(lqor\*(rq and \*(lqnot\*(rq,
  328. Xincreases in that order;
  329. Xparentheses can be used to override precedence.
  330. X.PP
  331. XSyntactically, actions (ACT) are lines beginning with spaces or tabs.
  332. XBEGIN_ACT and END_ACT stand for actions
  333. Xbeginning with '{' and '}' respectively;
  334. Xas a stylistic concession,
  335. Xthey may begin on the left margin, although they don't have to.
  336. XAll actions may contain newlines escaped by a backslash.
  337. X.PP
  338. XActions may be prefixed with flags.
  339. XTwo ('@' and '-') turn on options \-s and \-i respectively
  340. Xfor a single action.
  341. XThe third ('+') tells cake to execute the action
  342. Xeven if \-n says it shouldn't
  343. X(this is useful e.g. for recursive invocations of \*c with \-n).
  344. XThe fourth ('!') causes cake to give the action to the shell
  345. Xeven if it doesn't have to.
  346. X.SH SEMANTICS
  347. X.sp
  348. X\*C's semantics is based on that of make.
  349. XThe chief differences were listed
  350. Xat the beginning of this manual entry;
  351. Xa complete description with (hopefully illuminating) examples
  352. Xshould be in the \*c users' guide (if it ever gets finished).
  353. X.PP
  354. XBriefly, \*c goes about updating a file in two main phases
  355. Xafter an initial phase.
  356. XThis initial phase does two things.
  357. XOne, it expands any command patterns on the left side of dependencies.
  358. XAs at this stage there is no way to find values for them,
  359. Xvariables should not occur in these patterns.
  360. XTwo, this phase selects the main target to be made
  361. Xif it was not given on the command line.
  362. XThis target is the target of the first specific (variable-free)
  363. Xdependency in the main \*(cf,
  364. Xor in any include files if there is no such dependency
  365. Xin the main \*(cf itself.
  366. XFor this purpose, entries with double colons
  367. Xare treated as if they were in the main \*(cf.
  368. X.PP
  369. XIn the first phase, \*c plans ahead.
  370. XIt matches the name(s) of the main target(s)
  371. Xagainst the patterns on the left hand side of dependencies.
  372. XA match must give values to every variable appearing in the entry;
  373. Xthese variables are replaced by their values in the rest of the entry.
  374. X\*C next updates any starred name patterns in the matched entry,
  375. Xexpands any source command patterns and evaluates the test (if any).
  376. X.PP
  377. X\*C classifies the surviving entries into two kinds:
  378. Xthose with actions and those without.
  379. XThe ones without actions represent unconditional dependencies,
  380. Xand their sources are now planned for.
  381. XIf any cannot be made, then the original file cannot be made either,
  382. Xalthough \*c will update as many components as it can.
  383. XNext \*c tries to plan for the sources of the entries with actions,
  384. Xand selects an entry for which all sources can be made.
  385. X(it is best to ensure either that there is only one such entry
  386. Xor that the effects of the actions of all these entries are the same).
  387. X.PP
  388. XAt the end of the planning phase
  389. X\*c has a directed acyclic graph
  390. Xrepresenting dependencies between files.
  391. XThe information attached to the nodes of this graph says
  392. Xwhether the file exists or not, what is its modify time if it does
  393. Xand what is its conceptual modify time.
  394. XThe conceptual modify time of a file with no ancestors
  395. Xis its real modify time;
  396. Xthe conceptual modify time of a file with ancestors
  397. Xis the latest conceptual modify time of any of its ancestors.
  398. X(Pseudofiles and files with no ancestors but with actions
  399. Xare treated specially, but in the same general spirit.)
  400. XThe execute phase just traverses the graph in a postorder-like fashion,
  401. Xand invokes the actions of those nodes whose files do not exist
  402. Xor whose modify times are earlier than their conceptual modify times.
  403. X.PP
  404. XActions and commands returning nonzero status
  405. Xprevent any further processing of the node involved
  406. Xand lead to the deletion of the targets,
  407. Xexcept in the obvious of case of tests
  408. X(where the status code is used to return a boolean value
  409. Xand not to signal an error).
  410. X.PP
  411. XThe above is only a sketch of what actually happens.
  412. XFor example, it does not describe what happens
  413. Xwhen an entry has more than one target.
  414. XAnd of course flags on patterns and actions and command-line arguments
  415. Xall modify \*c's behaviour.
  416. XA detailed explanation with examples of all this
  417. Xcan be found in the \*c users' guide.
  418. X.SH ACTIONS
  419. X.sp
  420. X\*C has three mechanisms for the execution of actions.
  421. XWhich one \*c chooses depends on the form of the action
  422. Xbut can be overridden by the user.
  423. XThe first two were present in make;
  424. Xthe third is unique to \*c and has a slightly different syntax.
  425. X.IP (a)
  426. X\*C may itself parse an action into words and call exec(2).
  427. XThis is the most efficient way of executing actions,
  428. Xand is therefore the one that \*c applies whereever possible.
  429. XHowever, it works only if the action does not contain metacharacters;
  430. X\*c uses (b) if it does.
  431. X.IP (b)
  432. XThe action can be given to the shell.
  433. X\*C does this if the action contains shell metacharacters
  434. Xor if it is instructed to by the user (see the action flag '!' above).
  435. X.IP (c)
  436. XThe action may be a shell script.
  437. XShell scripts consist of a sequence of actions,
  438. Xthe first of which begins with a '{' and
  439. Xthe last  of which begins with a '}'.
  440. XThe text of an action may follow either or both of '{' and '}',
  441. Xbut it is neater to have '{' and '}' on lines of their own.
  442. XAny flags before the second and later lines
  443. Xof a shellscript are ignored.
  444. X.PP
  445. X\*C will expand any bracketed commands in actions
  446. Xin exactly the same way as if they were command patterns.
  447. XEach command is executed only once
  448. Xand its output reused if necessary.
  449. XThis should not cause any problems
  450. Xunless the cakefile wants to have the same command is executed
  451. Xin two different environments;
  452. Xin this case you can rely on the C-shell backquote mechanism,
  453. Xbut beware: backquotes and double brackets don't mix.
  454. X.PP
  455. XInterrupt and quit signals cause
  456. Xthe targets of the current actions to be deleted;
  457. Xthe exceptions are pseudofiles, directories
  458. Xand targets that have a '!' flag.
  459. X.SH OPTIONS
  460. X.sp
  461. X\*C has most of make's options, but it has new options too.
  462. XSome of the options have effects that can also be achieved
  463. Xwith action prefixes, as described below.
  464. XOptions can be given to \*c (in order of increasing priority)
  465. Xin the environment variable CAKE,
  466. Xon the command line
  467. Xor in the \*(cf itself.
  468. XOnly the command line options are included in the macro CAKEFLAGS.
  469. XSome options are not effective when given from inside the \*(cf;
  470. Xthese are \-f, \-g, \-D, \-I and \-U.
  471. X.IP \-a
  472. XAbort the whole run if \*c sees an action return with a nonzero status
  473. X(\*c can turn a blind eye on a nonzero status if so instructed
  474. X(see \-i below)).
  475. XNote that in make the effect of \-a is the default.
  476. X.IP \-b
  477. XPrint actions \fIbefore\fP any bracketed commands in them are expanded.
  478. XThe default is to print them afterwards.
  479. X.IP \-c
  480. XUse the last status change time of files
  481. Xinstead of the last modify time (see stat(2)).
  482. X.IP \-d
  483. XDelete all regenerable intermediate files
  484. Xafter all other tasks have been completed
  485. X(files which can be updated but which are older than their ancestors
  486. Xare not considered regenerable).
  487. XFiles postfixed with '^' are considered candidates for deletion
  488. Xeven if this flag is not specified.
  489. X.IP "\-f file"
  490. XUse the given file to describe dependencies.
  491. XIf this option is missing,
  492. X\*(lqcakefile\*(rq, \*(lqCakefile\*(rq,
  493. X\*(lqrecipe\*(rq and \*(lqRecipe\*(rq are tried, in that order.
  494. XNote that unlike make, \*c accepts only one \-f option;
  495. Xif more are supplied, only the last one has effect.
  496. XWith #include's being expanded by the preprocessor,
  497. Xmultiple \-f's are not needed.
  498. X.IP \-g
  499. XGo to (i.e. cd to) the directory containing the \*(cf
  500. Xbefore doing anything else.
  501. XAfter this, all commands and actions issued by \*c
  502. Xwill behave as if \*c had started in that directory.
  503. X.IP \-i
  504. XIgnore the status returned by actions.
  505. XThis option is turned on for an action
  506. Xby prefixing it with a '-'.
  507. XNote that this overrides options \-R and \-a.
  508. X.IP \-k
  509. XKeep going in the event of an error,
  510. Xfollowing branches that are not related to files which cannot be made.
  511. XSince this is the default in \*c,
  512. Xit is included purely for compatibility with make.
  513. XIts only effect is to negate an earlier \-a.
  514. X.IP \-n
  515. XTrace and print, but do not execute
  516. Xthe actions needed to update the targets,
  517. Xincluding those that are normally executed but not printed.
  518. XThe prefixes will be printed with the actions.
  519. XIf the prefixes include '+', the action will still be executed.
  520. XIn this mode \*c assumes that
  521. Xthe actions would not change any nonvolatile files.
  522. XNote that only one of \-n, \-q and \-t may be given,
  523. Xand that \-n overrides \-s.
  524. X.IP \-q
  525. XReport if the main targets are up-to-date:
  526. Xreturn exit status 0 if they are and 1 otherwise.
  527. XIn this mode, the only actions executed
  528. Xare those needed to discover dependency information.
  529. XNote that only one of \-n, \-q and \-t may be given.
  530. X.IP \-r
  531. XAfter each action reset the modify times of target files
  532. Xto the modify time of the last updated ancestor.
  533. XThis makes the physical update time
  534. Xcorrespond more closely to the logical update time.
  535. X.IP \-s
  536. XDo not print actions.
  537. XEven without \-s, \*c does not print actions with a '@' prefix.
  538. XBoth \-s and '@' are overridden by \-n.
  539. X.IP \-t
  540. XTouch, i.e. change only the modified date of targets,
  541. Xwithout executing any actions.
  542. XIf the -r flag is set, the modified date will be reset
  543. Xto the that of the last modified ancestor.
  544. XIf not, it will reset to the current time.
  545. XNote that only one of \-n, \-q and \-t may be given.
  546. X.IP \-v
  547. XPrint error messages that are even more verbose than usual.
  548. X.IP \-w
  549. XThe output of the C preprocessor frequently contains
  550. Xnon-significant spaces and tabs resulting from macro expansion.
  551. X\*C normally squeezes these out from actions before printing them.
  552. XThe \-w (for wide) options prevents \*c from doing this.
  553. X.IP \-x
  554. XWhen specified, \-x prevents cake
  555. Xfrom printing its own error message when an action fails.
  556. X.IP \-z
  557. XDo not expect bracketed commands to return zero exit status.
  558. XUnfortunately a fair number of programs
  559. Xdo not bother to return the correct exit status;
  560. Xif you are using one of these then specify \-z.
  561. X.IP "\-Ddefn, \-Udefn, \-Idir"
  562. XThese arguments are given to the preprocessor.
  563. XAny directories named here will be searched before the standard ones.
  564. X.IP \-G
  565. XEnable members of a group which has write permission on a directory
  566. Xto use \*c to update files in that directory,
  567. Xeven if they don't have write permission on the files themselves.
  568. X\*C does this by removing all targets of a rule
  569. Xbefore invoking its actions, \fIeven if they are said to be precious\fP.
  570. XThe one thing which \fIdoes\fP stop \-G is \-n.
  571. XIn rare cases this may cause problems with actions prefixed by '+';
  572. Xthe solution is to remove the offending files by hand.
  573. X.IP \-L
  574. XCheck rules for simple loops.
  575. XIf a target depends directly upon itself, and this option is set,
  576. X\*c will ignore the rule in question for that target.
  577. XThis is useful for rules of the form %: DIR_PREFIX/**/%,
  578. Xwhere DIR_PREFIX turns out to be empty.
  579. X.IP \-N num
  580. X\*C allows \fInum\fP outstanding (non-waited for)
  581. Xprocesses at any one time.
  582. XIf \fInum\fP is zero,
  583. Xall commands are executed synchronously.
  584. XIf it is one or more,
  585. Xprocesses (up to the limit) are spawned in background
  586. Xand are waited for only at the point where their results are used.
  587. XThe default value of N depends on the system:
  588. Xlarger machines should usually set it higher than smaller ones.
  589. X(This option is not yet implemented.)
  590. X.IP \-R
  591. XDo not remove the targets of any actions
  592. Xwhich return nonzero status (but see \-i above).
  593. XThe default is to remove them to keep consistency.
  594. X.IP "\-S1 shell"
  595. XUse the given shell to execute commands and actions.
  596. XNote that the argument of \-S1 needs to be of the form
  597. X\*(lqcommand\*(rq or \*(lqcommand \-option\*(rq.
  598. XCommands and simple actions to be executed
  599. Xare given to the shell as one argument after the option if any.
  600. XThe C and Bourne shells need -c for option.
  601. XThe default is \*(lq/bin/csh -fc\*(rq;
  602. Xto use the Bourne shell specify -S1 \*(lq/bin/sh -c\*(rq.
  603. X.IP "\-S2 shell"
  604. XUse the given shell to execute shell scripts.
  605. XShell needs to be of the same form as the argument of \-S1.
  606. XScripts are written to a file and
  607. Xthe filename is passed to the shell after the option if any.
  608. XOne can use different shells for actions and scripts.
  609. XThe mnemonic of value of \-S1 and \-S2 is that
  610. Xthe first only applies to single-line actions,
  611. Xwhile scripts are always at least two lines long.
  612. XThe default is \*(lq/bin/csh -f\*(rq;
  613. Xto use the Bourne shell specify -S2 \*(lq/bin/sh\*(rq.
  614. X.IP "\-T string"
  615. XThe characters occurring in the string
  616. Xare considered metacharacters of the single action (\-S1) shell.
  617. XIf an action contains any of these it will be given to the shell;
  618. Xotherwise it will be parsed and executed by cake directly.
  619. XThe default string (for csh) is *?!&|;<>()[]{}'`"%$~#.
  620. X.IP \-X
  621. XNormally \*c will \*(lqremove\*rq user files by moving them to /tmp.
  622. XIf the \-X option is set, it will remove them permamently.
  623. X.IP \-Z
  624. XDo nothing except print the output of the C preprocessor.
  625. XThis option overrides all others.
  626. X.SH FILES
  627. X.sp
  628. Xcakefile, Cakefile, recipe, Recipe
  629. X.br
  630. X/usr/lib/cake
  631. X.br
  632. X~/lib/cake
  633. X.br
  634. X/tmp/Cake*
  635. X.SH DIAGNOSTICS
  636. X.sp
  637. X\*C's diagnostics fall into three classes.
  638. XThe most important class is the messages given
  639. Xwhen \*c finds an error in the \*(cf or during the execution
  640. Xof an action; these are generally similar to make's,
  641. Xthough \*c prefixes its messages by its name.
  642. XThe second class, whose messages begin with "cake system error",
  643. Xreport problems with \*c's system calls; these should be pretty rare.
  644. XThe third class, whose messages begin with "cake internal error",
  645. Xreport overflows of various arrays, which can be fixed by recompilation,
  646. Xand failed internal consistency checks, which cannot.
  647. X.PP
  648. X\*C itself will return nonzero status (actually 1)
  649. Xif any of the main targets were not updated properly.
  650. X.PP
  651. XThe \-Z option can be useful in tracking down syntax errors
  652. X(that's what it is there for).
  653. X\*C also has five \*(lqhidden\*(rq options, \-C, \-E, \-P, \-W and \-Y,
  654. Xwhich print out different kinds of debugging information
  655. Xduring execution;
  656. Xthese are not very likely to be helpful to anyone but the author,
  657. Xbut you never know.
  658. X.SH "SEE ALSO"
  659. X.sp
  660. Xmake(1), ccincl(1), later(1), need(1), soincl(1), sub(1), yyrepl(1).
  661. X.sp
  662. XS. I. Feldman:
  663. X.I
  664. XMake \- A Program for Maintaining Computer Programs,
  665. XSoftware - Practice and Experience, April 1979, pp. 255-265.
  666. X.sp
  667. XG. S. Fowler:
  668. X.I
  669. XA Fourth Generation Make,
  670. XProceedings of the 1985 Summer Usenix Conference, pp 159-174.
  671. X.sp
  672. XZ. Somogyi:
  673. X.I
  674. XCake: a fifth generation version of make,
  675. XAustralian Unix system User Group Newsletter
  676. X7:6, April 1987, pp. 22-31.
  677. X.sp
  678. XThe standard \*(cfs in /usr/lib/cake.
  679. X.SH BUGS
  680. X.sp
  681. XThe C preprocessor sometimes replaces its control lines
  682. Xwith blank lines instead of removing them.
  683. XThese blank lines then foul up \*c's picture
  684. Xof the boundaries of entries.
  685. XFor this reason, it is safest to use #ifdef's etc
  686. Xonly on complete entries;
  687. Xin this case their replacement by blank lines has no effect.
  688. X.sp
  689. X\*C's own action/command parsing routine may sometimes make mistakes.
  690. XIf you suspect that this is the case,
  691. Xprefix the action by '!',
  692. Xput a metacharacter into the action/command (" is the easiest),
  693. Xor enlarge the set of metacharacters with -T
  694. Xto include a character of the action/command (e.g. a-z).
  695. X.sp
  696. XThe set of pattern flags and the set of action flags overlap;
  697. Xthis is a result of the cramped ASCII character set.
  698. X.sp
  699. XThe syntax of options with arguments is confusing.
  700. XThe ones passed on to the preprocessor have no space
  701. Xbefore the option's argument; the others do.
  702. X.sp
  703. XThe -N option is not yet implemented.
  704. X.\"    @(#)cake.l    9/2/85
  705. SHAR_EOF
  706. if test 24383 -ne "`wc -c < 'cake.1l'`"
  707. then
  708.     echo shar: "error transmitting 'cake.1l'" '(should have been 24383 characters)'
  709. fi
  710. fi
  711. echo shar: "extracting 'ccincl.1l'" '(1583 characters)'
  712. if test -f 'ccincl.1l'
  713. then
  714.     echo shar: "will not over-write existing file 'ccincl.1l'"
  715. else
  716. sed 's/^X//' << \SHAR_EOF > 'ccincl.1l'
  717. X.ds c \fIccincl\fP
  718. X.ds C \fIccincl\fP
  719. X.TH CCINCL 1-ucb
  720. X.SH NAME
  721. Xccincl \- find #include files
  722. X.SH ORIGIN
  723. XUniversity of Melbourne
  724. X.SH SYNOPSIS
  725. X.B ccincl
  726. X[ options ] ...  file ...
  727. X.SH DESCRIPTION
  728. X.sp 1
  729. X\*C is a tool to find #included files,
  730. Xand is intended to be used in conjunction with cake(1).
  731. XIt goes through the given files and
  732. Xprints out the names of all #included files.
  733. X.SH OPTIONS
  734. X.sp 1
  735. X.IP \-f
  736. XPrint the current filename and a colon before every include file found.
  737. X.IP \-r
  738. XRecursively search every include file found.
  739. X.IP "\-ifile"
  740. XIgnore file - don't report it and do not recurse on it.
  741. X.IP "\-sfile"
  742. XStop recursion at file but do report it.
  743. X.IP \-Cdir
  744. XConsider the current directory to be dir instead of ".".
  745. X.IP \-Idir
  746. XSearch for include files in the given directory.
  747. XLike cpp, \*c searches first the current directory,
  748. Xthen directories given in \-I arguments,
  749. Xand then /usr/include.
  750. XAlso like cpp, the current directory is not searched
  751. Xfor inclusions using the <file> syntax.
  752. X.PP
  753. X\*C detects that two or more different filenames refer to the same file
  754. Xby checking their inode numbers.
  755. XIt always uses only one name for a file, the first it encounters.
  756. X.PP
  757. X\*C 
  758. X.SH "SEE ALSO"
  759. Xcake(1)
  760. X.SH BUGS
  761. X.sp 1
  762. X\*C doesn't handle multiple directory jumps very well;
  763. Xin particular when processing include files in a different directory
  764. Xit still interprets file names with respect to the current directory,
  765. Xnot with respect to the new directory, as cpp does.
  766. X.PP
  767. X\*C is in trouble if it finds two files in different filesystems
  768. Xthat have the same inode number.
  769. X.\"    @(#)ccincl.l    9/2/85
  770. SHAR_EOF
  771. if test 1583 -ne "`wc -c < 'ccincl.1l'`"
  772. then
  773.     echo shar: "error transmitting 'ccincl.1l'" '(should have been 1583 characters)'
  774. fi
  775. fi
  776. echo shar: "extracting 'ccs.1l'" '(479 characters)'
  777. if test -f 'ccs.1l'
  778. then
  779.     echo shar: "will not over-write existing file 'ccs.1l'"
  780. else
  781. sed 's/^X//' << \SHAR_EOF > 'ccs.1l'
  782. X.TH CS 1-ucb
  783. X.SH NAME
  784. Xcs \- print cake usage statistics
  785. X.SH ORIGIN
  786. XUniversity of Melbourne
  787. X.SH SYNOPSIS
  788. X.B cs
  789. X.SH DESCRIPTION
  790. X.sp 1
  791. X\fICs\fP prints out statistics on cake usage.
  792. XFor each cake user, it prints an invocation count,
  793. Xaverage time spent in the cake and child processes
  794. Xin user and system mode,
  795. Xaverage time spent in all processes and modes,
  796. Xtotal cpu time,
  797. Xand the ratio of cake user time to cake system time
  798. Xplus children's user and system times.
  799. X.\"    @(#)cs.l    9/2/85
  800. SHAR_EOF
  801. if test 479 -ne "`wc -c < 'ccs.1l'`"
  802. then
  803.     echo shar: "error transmitting 'ccs.1l'" '(should have been 479 characters)'
  804. fi
  805. fi
  806. echo shar: "extracting 'cs.1l'" '(479 characters)'
  807. if test -f 'cs.1l'
  808. then
  809.     echo shar: "will not over-write existing file 'cs.1l'"
  810. else
  811. sed 's/^X//' << \SHAR_EOF > 'cs.1l'
  812. X.TH CS 1-ucb
  813. X.SH NAME
  814. Xcs \- print cake usage statistics
  815. X.SH ORIGIN
  816. XUniversity of Melbourne
  817. X.SH SYNOPSIS
  818. X.B cs
  819. X.SH DESCRIPTION
  820. X.sp 1
  821. X\fICs\fP prints out statistics on cake usage.
  822. XFor each cake user, it prints an invocation count,
  823. Xaverage time spent in the cake and child processes
  824. Xin user and system mode,
  825. Xaverage time spent in all processes and modes,
  826. Xtotal cpu time,
  827. Xand the ratio of cake user time to cake system time
  828. Xplus children's user and system times.
  829. X.\"    @(#)cs.l    9/2/85
  830. SHAR_EOF
  831. if test 479 -ne "`wc -c < 'cs.1l'`"
  832. then
  833.     echo shar: "error transmitting 'cs.1l'" '(should have been 479 characters)'
  834. fi
  835. fi
  836. echo shar: "extracting 'gred.1l'" '(275 characters)'
  837. if test -f 'gred.1l'
  838. then
  839.     echo shar: "will not over-write existing file 'gred.1l'"
  840. else
  841. sed 's/^X//' << \SHAR_EOF > 'gred.1l'
  842. X.TH GRED 1-ucb
  843. X.SH NAME
  844. Xgred \- global regular expression delete
  845. X.SH ORIGIN
  846. XUniversity of Melbourne
  847. X.SH SYNOPSIS
  848. X.B gred
  849. Xpattern file ...
  850. X.SH DESCRIPTION
  851. X.sp 1
  852. X\fIGred\fP deleted from all its argument files
  853. Xthose lines matching the given ex(1) pattern.
  854. X.\"    @(#)gred.l    9/2/85
  855. SHAR_EOF
  856. if test 275 -ne "`wc -c < 'gred.1l'`"
  857. then
  858.     echo shar: "error transmitting 'gred.1l'" '(should have been 275 characters)'
  859. fi
  860. fi
  861. echo shar: "extracting 'gres.1l'" '(286 characters)'
  862. if test -f 'gres.1l'
  863. then
  864.     echo shar: "will not over-write existing file 'gres.1l'"
  865. else
  866. sed 's/^X//' << \SHAR_EOF > 'gres.1l'
  867. X.TH GRES 1-ucb
  868. X.SH NAME
  869. Xgres \- global regular expression substitution
  870. X.SH ORIGIN
  871. XUniversity of Melbourne
  872. X.SH SYNOPSIS
  873. X.B gres
  874. Xoldpattern newpattern file ...
  875. X.SH DESCRIPTION
  876. X.sp 1
  877. X\fIGres\fP substitutes in all its argument files
  878. Xthe new ex(1) pattern for the old.
  879. X.\"    @(#)gres.l    9/2/85
  880. SHAR_EOF
  881. if test 286 -ne "`wc -c < 'gres.1l'`"
  882. then
  883.     echo shar: "error transmitting 'gres.1l'" '(should have been 286 characters)'
  884. fi
  885. fi
  886. echo shar: "extracting 'gsrc.1l'" '(1571 characters)'
  887. if test -f 'gsrc.1l'
  888. then
  889.     echo shar: "will not over-write existing file 'gsrc.1l'"
  890. else
  891. sed 's/^X//' << \SHAR_EOF > 'gsrc.1l'
  892. X.ds g \fIgsrc\fP
  893. X.ds G \fIGsrc\fP
  894. X.TH GSRC 1-ucb
  895. X.SH NAME
  896. Xgsrc \- find generated files
  897. X.SH ORIGIN
  898. XUniversity of Melbourne
  899. X.SH SYNOPSIS
  900. X.B gsrc
  901. Xsuffix ...  file ...
  902. X.SH DESCRIPTION
  903. X.sp 1
  904. X\*G is a tool for finding generated files.
  905. XIt is intended to be used in conjunction with cake(1),
  906. Xand in particular with the cakefiles Main and System.
  907. XIt needs to kinds of arguments.
  908. XOne is a make(1)-style list of suffixes
  909. Xwhich describe dependencies between files;
  910. Xthe other is a list of basic filenames
  911. X(filenames without any suffixes).
  912. XFor each base name argument,
  913. X\*g outputs the names of the files
  914. Xwhich have that base name,
  915. Xwhose suffix is on the suffixlist,
  916. Xand whose suffix is not the rightmost suffix for which a file exists.
  917. X.lp
  918. XSince this "explanation" is none too clear, here is an example:
  919. X.SH "EXAMPLE"
  920. X.sp 1
  921. XA typical invocation of \*g would be "gsrc .c .l .y file1 file2 file3"
  922. Xin a directory containing file1.c file2.c file2.y file3.c and file3.l;
  923. Xfor this \*g will output file2.c file3.c, signifying that
  924. Xfile2.c and file3.c were generated (by yacc(1) and lex(1) respectively).
  925. X.SH "SEE ALSO"
  926. Xcake(1), usrc(1)
  927. X.SH BUGS
  928. X.sp 1
  929. XSuffix dependencies really form a tree, not a list.
  930. XThis causes \*g to get confused if two user-written files
  931. X(i.e. non-generated files) have the same basename
  932. Xand if they both have their suffix on the list.
  933. XSince the Main and System cakefiles run \*g
  934. Xto identify files which are to be cleaned up,
  935. Xthis is definitely not healthy.
  936. XFor this reason, the default RM_CMD in those cakefiles
  937. Xjust moves its arguments to /tmp.
  938. X.\"    @(#)gsrc.l    7/7/86
  939. SHAR_EOF
  940. if test 1571 -ne "`wc -c < 'gsrc.1l'`"
  941. then
  942.     echo shar: "error transmitting 'gsrc.1l'" '(should have been 1571 characters)'
  943. fi
  944. fi
  945. echo shar: "extracting 'irrel.1l'" '(335 characters)'
  946. if test -f 'irrel.1l'
  947. then
  948.     echo shar: "will not over-write existing file 'irrel.1l'"
  949. else
  950. sed 's/^X//' << \SHAR_EOF > 'irrel.1l'
  951. X.TH IRREL 1-ucb
  952. X.SH NAME
  953. Xirrel \- filter out irrelevant junk
  954. X.SH ORIGIN
  955. XUniversity of Melbourne
  956. X.SH SYNOPSIS
  957. X.B irrel
  958. Xpattern ...
  959. X.SH DESCRIPTION
  960. X.sp 1
  961. X\fIIrrel\fP is a filter which removes from the stream
  962. Xall lines matching any one of its argument patterns.
  963. XOther lines are passed through without modification.
  964. X.\"    @(#)irrel.l    9/2/85
  965. SHAR_EOF
  966. if test 335 -ne "`wc -c < 'irrel.1l'`"
  967. then
  968.     echo shar: "error transmitting 'irrel.1l'" '(should have been 335 characters)'
  969. fi
  970. fi
  971. echo shar: "extracting 'later.1l'" '(672 characters)'
  972. if test -f 'later.1l'
  973. then
  974.     echo shar: "will not over-write existing file 'later.1l'"
  975. else
  976. sed 's/^X//' << \SHAR_EOF > 'later.1l'
  977. X.TH LATER 1-ucb
  978. X.SH NAME
  979. Xlater \- print files later than a reference file
  980. X.SH ORIGIN
  981. XUniversity of Melbourne
  982. X.SH SYNOPSIS
  983. X.B later
  984. X[\-cs] reffile file ...
  985. X.SH DESCRIPTION
  986. X.sp 1
  987. X\fILater\fP is a tool intended to work with \fIcake\fP.
  988. XOf its second and later arguments,
  989. Xit prints out those which have a strictly later modify time
  990. Xthan the reference file.
  991. XIf \-c (count) is given, it also returns
  992. Xthe number of filenames printed as its exit status.
  993. XThis program is intended to do for \fIcake\fP
  994. Xwhat the $? macro does for \fImake\fP.
  995. XIf -s (silent) is given,
  996. Xit does not print anything;
  997. Xit only returns the exit status.
  998. X.SH "SEE ALSO"
  999. Xmake(1), cake(1)
  1000. X.\"    @(#)later.l    9/2/85
  1001. SHAR_EOF
  1002. if test 672 -ne "`wc -c < 'later.1l'`"
  1003. then
  1004.     echo shar: "error transmitting 'later.1l'" '(should have been 672 characters)'
  1005. fi
  1006. fi
  1007. echo shar: "extracting 'need.1l'" '(569 characters)'
  1008. if test -f 'need.1l'
  1009. then
  1010.     echo shar: "will not over-write existing file 'need.1l'"
  1011. else
  1012. sed 's/^X//' << \SHAR_EOF > 'need.1l'
  1013. X.TH NEED 1-ucb
  1014. X.SH NAME
  1015. Xneed \- find appropriate preprocessors
  1016. X.SH ORIGIN
  1017. XUniversity of Melbourne
  1018. X.SH SYNOPSIS
  1019. X.B need
  1020. Xprogram file
  1021. X.SH DESCRIPTION
  1022. X.sp 1
  1023. X\fINeed\fP is a tool intended to work with \fIcake\fP.
  1024. XIt returns a zero exit status
  1025. Xif \fIfile\fP needs to be processed with \fIprogram\fP
  1026. Xand nonzero otherwise.
  1027. X\fINeed\fP searches \fIfile\fP for a line which contains
  1028. Xboth the keyword NEED and the name of the \fIprogram\fP.
  1029. XBy convention files should begin with a comment line
  1030. Xindicating all necessary preprocessors.
  1031. X.SH "SEE ALSO"
  1032. Xcake(1)
  1033. X.\"    @(#)need.l    9/2/85
  1034. SHAR_EOF
  1035. if test 569 -ne "`wc -c < 'need.1l'`"
  1036. then
  1037.     echo shar: "error transmitting 'need.1l'" '(should have been 569 characters)'
  1038. fi
  1039. fi
  1040. echo shar: "extracting 'needed.1l'" '(653 characters)'
  1041. if test -f 'needed.1l'
  1042. then
  1043.     echo shar: "will not over-write existing file 'needed.1l'"
  1044. else
  1045. sed 's/^X//' << \SHAR_EOF > 'needed.1l'
  1046. X.TH NEED 1-ucb
  1047. X.SH NAME
  1048. Xneeded \- find appropriate preprocessors
  1049. X.SH ORIGIN
  1050. XUniversity of Melbourne
  1051. X.SH SYNOPSIS
  1052. X.B needed
  1053. Xfile
  1054. X.SH DESCRIPTION
  1055. X.sp 1
  1056. X\fINeeded\fP is a tool intended to work with \fIcake\fP
  1057. Xand the cakefile Text.
  1058. XIt returns the characters in \fIfile\fP
  1059. Xbetween the first occurrence of the word NEED
  1060. Xand the next end-of-line.
  1061. XBy convention this contains the generic names
  1062. Xof the list of nroff/troff preprocessors
  1063. X\fIfile\fP needs to be put through.
  1064. X("Generic" means that you should use "eqn" instead of "neqn" or "deqn";
  1065. XText will choose the appropriate version based on the intended target.)
  1066. X.SH "SEE ALSO"
  1067. Xcake(1)
  1068. X.\"    @(#)need.l    9/2/85
  1069. SHAR_EOF
  1070. if test 653 -ne "`wc -c < 'needed.1l'`"
  1071. then
  1072.     echo shar: "error transmitting 'needed.1l'" '(should have been 653 characters)'
  1073. fi
  1074. fi
  1075. echo shar: "extracting 'ol.1l'" '(594 characters)'
  1076. if test -f 'ol.1l'
  1077. then
  1078.     echo shar: "will not over-write existing file 'ol.1l'"
  1079. else
  1080. sed 's/^X//' << \SHAR_EOF > 'ol.1l'
  1081. X.TH OL 1-ucb
  1082. X.SH NAME
  1083. Xol \- print an outline of papers written with -me
  1084. X.SH ORIGIN
  1085. XUniversity of Melbourne
  1086. X.SH SYNOPSIS
  1087. X.B ol
  1088. Xfile ...
  1089. X.SH DESCRIPTION
  1090. X.sp 1
  1091. X\fIOl\fP prints out paper outlines.
  1092. XIt recognizes the -me section macros .sh and .uh,
  1093. Xas well as the local macros .tr, .le, .co and .dt
  1094. Xfor theorems, lemmas, corollaries and definition of terms.
  1095. XFor each of these macros, ol prints out its source line number,
  1096. Xwhat it introduces (e.g. sction 1.2.3 or theorem 4.5), and
  1097. Xits title (e.g. "Introduction" or "Pumping lemma").
  1098. XThe latter two are indented to show structure.
  1099. X.\"    @(#)ol.l    9/2/85
  1100. SHAR_EOF
  1101. if test 594 -ne "`wc -c < 'ol.1l'`"
  1102. then
  1103.     echo shar: "error transmitting 'ol.1l'" '(should have been 594 characters)'
  1104. fi
  1105. fi
  1106. echo shar: "extracting 'soincl.1l'" '(397 characters)'
  1107. if test -f 'soincl.1l'
  1108. then
  1109.     echo shar: "will not over-write existing file 'soincl.1l'"
  1110. else
  1111. sed 's/^X//' << \SHAR_EOF > 'soincl.1l'
  1112. X.TH SOINCL 1-ucb
  1113. X.SH NAME
  1114. Xsoincl \- find included nroff files
  1115. X.SH ORIGIN
  1116. XUniversity of Melbourne
  1117. X.SH SYNOPSIS
  1118. X.B soincl
  1119. Xfile ...
  1120. X.SH DESCRIPTION
  1121. X.sp 1
  1122. X\fISoincl\fP is a tool to find files included by nroff's .so commands.
  1123. XIt is intended to be used in conjunction with cake(1).
  1124. XIt goes through the given files and prints out all .so'd files.
  1125. X.SH "SEE ALSO"
  1126. Xcake(1)
  1127. X.SH BUGS
  1128. X.\"    @(#)soincl.l    9/2/85
  1129. SHAR_EOF
  1130. if test 397 -ne "`wc -c < 'soincl.1l'`"
  1131. then
  1132.     echo shar: "error transmitting 'soincl.1l'" '(should have been 397 characters)'
  1133. fi
  1134. fi
  1135. echo shar: "extracting 'ssize.1l'" '(276 characters)'
  1136. if test -f 'ssize.1l'
  1137. then
  1138.     echo shar: "will not over-write existing file 'ssize.1l'"
  1139. else
  1140. sed 's/^X//' << \SHAR_EOF > 'ssize.1l'
  1141. X.TH SSIZE 1-ucb
  1142. X.SH NAME
  1143. Xssize \- sort wc -v output by file size
  1144. X.SH ORIGIN
  1145. XUniversity of Melbourne
  1146. X.SH SYNOPSIS
  1147. X.B size
  1148. Xfile ...
  1149. X.SH DESCRIPTION
  1150. X.sp 1
  1151. X\fISsize\fP runs wc -v on its arguments
  1152. Xand sorts the resulting output by size.
  1153. X.SH "SEE ALSO"
  1154. Xwc(1)
  1155. X.\"    @(#)ssize.l    9/2/85
  1156. SHAR_EOF
  1157. if test 276 -ne "`wc -c < 'ssize.1l'`"
  1158. then
  1159.     echo shar: "error transmitting 'ssize.1l'" '(should have been 276 characters)'
  1160. fi
  1161. fi
  1162. echo shar: "extracting 'sub.1l'" '(1098 characters)'
  1163. if test -f 'sub.1l'
  1164. then
  1165.     echo shar: "will not over-write existing file 'sub.1l'"
  1166. else
  1167. sed 's/^X//' << \SHAR_EOF > 'sub.1l'
  1168. X.TH SUB 1-ucb
  1169. X.SH NAME
  1170. Xsub \- perform substitutions
  1171. X.SH ORIGIN
  1172. XUniversity of Melbourne
  1173. X.SH SYNOPSIS
  1174. X.B sub
  1175. X[-i] [-vchar] oldpattern newpattern name ...
  1176. X.SH DESCRIPTION
  1177. X.sp 1
  1178. X\fISub\fP is a tool intended to work with \fIcake\fP,
  1179. Xalthough it may be useful in its own right.
  1180. XThe first two nonoption arguments are name patterns in the sense of
  1181. Xcake(l), except that variables are introduced not by % but by X,
  1182. Xor by the character following \-v if it is given.
  1183. X.sp 1
  1184. XSub matches each name against the old pattern,
  1185. Xsetting up the values of its variables,
  1186. Xthen prints out the new pattern with those values substituted.
  1187. XIf a name does not match the old pattern, \fIsub\fP prints nothing.
  1188. XE.g. the command "sub X.c X.o x.c y.h z.c" prints "x.o z.o".
  1189. X.sp 1
  1190. XThe exit code of \fIsub\fP is the number of unmatched names;
  1191. Xthe example above would exit with status code 1.
  1192. XThis can be useful for testing
  1193. Xwhether a name comforms to a pattern or not.
  1194. XHowever, the \-i option makes \fIsub\fP ignore failed matches;
  1195. Xwhen given \fIsub\fP will always exit with a zero status.
  1196. X.SH "SEE ALSO"
  1197. Xcake(1)
  1198. X.\"    @(#)sub.l    6/10/85
  1199. SHAR_EOF
  1200. if test 1098 -ne "`wc -c < 'sub.1l'`"
  1201. then
  1202.     echo shar: "error transmitting 'sub.1l'" '(should have been 1098 characters)'
  1203. fi
  1204. fi
  1205. echo shar: "extracting 'subcmd.1l'" '(1400 characters)'
  1206. if test -f 'subcmd.1l'
  1207. then
  1208.     echo shar: "will not over-write existing file 'subcmd.1l'"
  1209. else
  1210. sed 's/^X//' << \SHAR_EOF > 'subcmd.1l'
  1211. X.TH SUBCMD 1-ucb
  1212. X.SH NAME
  1213. Xsubcmd \- execute commands with arguments based on substitutions
  1214. X.SH ORIGIN
  1215. XUniversity of Melbourne
  1216. X.SH SYNOPSIS
  1217. X.B subcmd
  1218. X[-fginz] [-vchar] cmd oldpattern newpattern file ...
  1219. X.SH DESCRIPTION
  1220. X.sp 1
  1221. X\fISubcmd\fP is a version of sub(1) which,
  1222. Xinstead of printing out the result of its substitutions,
  1223. Xuses them to invoke a command.
  1224. XIf the \-g option is not present, the command is formed
  1225. Xby concatenating cmd, oldpattern(file) and newpattern(file)
  1226. X(with spaces in between, of course).
  1227. XIf it is, cmd is treated as a sprintf(3) control string
  1228. Xand given oldpattern(file) and newpattern(file) as arguments.
  1229. XFor example "subcmd mv X X.old x y z"
  1230. Xinvokes mv x x.old, mv y y.old, and mv z z.old,
  1231. Xwhile "subcmd -g 'grep xyzzy < %s > %s' X X.out x y z"
  1232. Xinvokes grep xyzzy < x > x.out, grep xyzzy < y > y.out,
  1233. Xand grep xyzzy < z > z.out.
  1234. X.SH OPTIONS
  1235. XThe -f (fast) option causes subcmd to use only one shell,
  1236. Xinstead of one per executed command.
  1237. XThe \-i and \-v options of \fIsubcmd\fP are the same as that of sub(1).
  1238. XThe \-g option affects the format of the command as specified above.
  1239. X\-n causes commands to be printed but not executed.
  1240. X\-z turns off checking for zero status (see diagnostics).
  1241. X.SH DIAGNOSTICS
  1242. XOne message per command executed;
  1243. Xerror message if command fails (returns nonzero status);
  1244. Xsame return code as sub(1).
  1245. X.SH "SEE ALSO"
  1246. Xsub(1), cake(1)
  1247. X.\"    @(#)subcmd.l    6/10/85
  1248. SHAR_EOF
  1249. if test 1400 -ne "`wc -c < 'subcmd.1l'`"
  1250. then
  1251.     echo shar: "error transmitting 'subcmd.1l'" '(should have been 1400 characters)'
  1252. fi
  1253. fi
  1254. echo shar: "extracting 'usrc.1l'" '(1522 characters)'
  1255. if test -f 'usrc.1l'
  1256. then
  1257.     echo shar: "will not over-write existing file 'usrc.1l'"
  1258. else
  1259. sed 's/^X//' << \SHAR_EOF > 'usrc.1l'
  1260. X.ds u \fIusrc\fP
  1261. X.ds U \fIUsrc\fP
  1262. X.TH USRC 1-ucb
  1263. X.SH NAME
  1264. Xusrc \- find ultimate source files
  1265. X.SH ORIGIN
  1266. XUniversity of Melbourne
  1267. X.SH SYNOPSIS
  1268. X.B usrc
  1269. Xsuffix ...  file ...
  1270. X.SH DESCRIPTION
  1271. X.sp 1
  1272. X\*U is a tool for finding ultimate source files.
  1273. XIt is intended to be used in conjunction with cake(1),
  1274. Xand in particular with the cakefiles Main and System.
  1275. XIt needs to kinds of arguments.
  1276. XOne is a make(1)-style list of suffixes
  1277. Xwhich describe dependencies between files;
  1278. Xthe other is a list of basic filenames
  1279. X(filenames without any suffixes).
  1280. X\*U outputs each base name argument
  1281. Xtogether with the rightmost suffix on the list
  1282. Xfor which a file exists.
  1283. XSince this "explanation" is none too clear, here is an example:
  1284. X.SH "EXAMPLE"
  1285. X.sp 1
  1286. XA typical invocation of \*u would be "usrc .c .l .y file1 file2 file3"
  1287. Xin a directory containing file1.c file2.c file2.y file3.c and file3.l;
  1288. Xfor this \*u will output file1.c file2.y file3.l, signifying that
  1289. Xthe ultimate source files are file1.c file2.y file3.l and that the
  1290. Xothers (file2.c and file3.c) were generated
  1291. X(by yacc(1) and lex(1) respectively).
  1292. X.SH "SEE ALSO"
  1293. Xcake(1), gsrc(1)
  1294. X.SH BUGS
  1295. X.sp 1
  1296. XSuffix dependencies really form a tree, not a list.
  1297. XThis causes \*u to get confused if two ultimate source files
  1298. X(i.e. non-generated files) have the same basename
  1299. Xand if they both have their suffix on the list.
  1300. XSince the Main and System cakefiles run \*u
  1301. Xto identify files which are to be printed,
  1302. Xthis is not too serious (unlike tha parallel problem with gsrc(1)).
  1303. X.\"    @(#)usrc.l    7/7/86
  1304. SHAR_EOF
  1305. if test 1522 -ne "`wc -c < 'usrc.1l'`"
  1306. then
  1307.     echo shar: "error transmitting 'usrc.1l'" '(should have been 1522 characters)'
  1308. fi
  1309. fi
  1310. echo shar: "extracting 'yyrepl.1l'" '(1210 characters)'
  1311. if test -f 'yyrepl.1l'
  1312. then
  1313.     echo shar: "will not over-write existing file 'yyrepl.1l'"
  1314. else
  1315. sed 's/^X//' << \SHAR_EOF > 'yyrepl.1l'
  1316. X.TH YYREPL 1-ucb
  1317. X.SH NAME
  1318. Xyyrepl \- manage two or more yacc/lex systems in the same directory
  1319. X.SH ORIGIN
  1320. XUniversity of Melbourne
  1321. X.SH SYNOPSIS
  1322. X.B yyrepl
  1323. Xpatternfile targetfile ...
  1324. X.SH DESCRIPTION
  1325. X.sp 1
  1326. XThe standard Unix tools yacc(1) and lex(1)
  1327. Xare not set up to work with multiple parsers and/or scanners
  1328. Xin the same directory.
  1329. XThey put their output in fixed-name files
  1330. Xand export and import fixed-name data structures and functions.
  1331. X.sp 1
  1332. X\fIYyrepl\fP is a tool intended to work with \fIcake\fP,
  1333. Xalthough it can also be used with \fImake\fP and on its own.
  1334. XIt searches \fIpatternfile\fP for a line which contains
  1335. Xthe keyword YYREPL followed by (at least) two words.
  1336. XThen it goes through the \fItargetfile\fPs,
  1337. Xsystematically substituting
  1338. Xthe first word for yy and the second word for YY.
  1339. X.sp 1
  1340. XIn the intended usage,
  1341. Xevery yacc (or lex) file except possibly one has a YYREPL line,
  1342. Xwith these lines specifying different replacements
  1343. X(e.g. xx XX and zz ZZ).
  1344. XThen \fIyyrepl\fP is run once for each parser/scanner pair,
  1345. Xwith the \fIpatternfile\fP is being the yacc (or lex) source
  1346. Xand the \fItargetfile\fPs are the parser and scanner in C.
  1347. X.SH "SEE ALSO"
  1348. Xyacc(1), lex(1), make(1), cake(1)
  1349. X.\"    @(#)yyrepl.l    9/2/85
  1350. SHAR_EOF
  1351. if test 1210 -ne "`wc -c < 'yyrepl.1l'`"
  1352. then
  1353.     echo shar: "error transmitting 'yyrepl.1l'" '(should have been 1210 characters)'
  1354. fi
  1355. fi
  1356. exit 0
  1357. #    End of shell archive
  1358.